﻿function getoj_hdu(html){
	var info = {};
	info.submitted = null;
	info.solved = null;
	var reg_submitted = '<td>Problems Submitted<\\/td><td align=center>(\\d+)<\\/td>';
	var submitted = html.match(new RegExp(reg_submitted,'i'));
	if (submitted)
		submitted = submitted[1];
	info.submitted = submitted;
	
	var reg_solved = '<td>Problems Solved<\\/td><td align=center>(\\d+)<\\/td>';
	var solved = html.match(new RegExp(reg_solved,'i'));
	if (solved)
		solved = solved[1];
	info.solved = solved;
	
	return info;
}

function getoj_pku(html,id){
	var info = {};
	info.submitted = null;
	info.solved = null;
	var reg_submitted = '<a href=status\\?user_id='+id+'>(\\d+)<\\/a';
	var submitted = html.match(new RegExp(reg_submitted,'i'));
	if (submitted)
		submitted = submitted[1];
	info.submitted = submitted;
	
	var reg_solved = '<a href=status\\?result=0&user_id='+id+'>(\\d+)<\\/a';
	var solved = html.match(new RegExp(reg_solved,'i'));
	if (solved)
		solved = solved[1];
	info.solved = solved;
	
	return info;
}

function getoj_bistu(html){
	var info = {};
	info.submitted = null;
	info.solved = null;
	var reg_submitted = '总提交<\\/th><td><DIV align=center><span CONTENTEDITABLE=true>&nbsp;(\\d+)<\\/span';
	var submitted = html.match(new RegExp(reg_submitted,'i'));
	if (submitted)
		submitted = submitted[1];
	info.submitted = submitted;
	
	var reg_solved = '解决题目<\\/th><td><DIV align=center><span CONTENTEDITABLE=true>&nbsp;(\\d+)<\\/span';
	var solved = html.match(new RegExp(reg_solved,'i'));
	if (solved)
		solved = solved[1];
	info.solved = solved;
	
	return info;
	return null;
}

function getoj(html,site){
}